<div class='span12'>
    <!-- HEADER -->
    <div class='row-fluid'>
        <div class='span12'>
            <div class='page-header'>

                <h1 class="span8">
                    <i class='icon-camera'></i>
                    <span>Banner Management</span>
                </h1>
 <div class="span4 text-right">
                    <a href="<?= URL::to('banner/admin/list/'); ?>" class="btn btn-large btn-inverse">List</a>
                </div>
            </div>
        </div>
    </div>

    <!-- END OF HEADER -->


    <div class='row-fluid'>
        <div class="span12 box bordered-box blue-border" >
            <div class="box-header blue-background">
                <div class="title"><?= $title; ?></div>
                <div class="actions">
                    <a href="#" class="btn box-remove btn-mini btn-link"><i class="icon-remove"></i>
                    </a>
                    <a href="#" class="btn box-collapse btn-mini btn-link"><i></i>
                    </a>
                </div>
            </div>
			<span class="pull-right text text-error">* Marks fileds are mandatory</span>
            <div class="box-content box-double-padding">
            <?php if(Session::get('message')){?>
            <?php echo Session::get('message');?>
            <?php }?>
                <form class="form" method="post" action="<?= URL::current();?>" accept-charset="<?= Settings::get('en','charecter_set');?>" enctype="multipart/form-data">
                    <fieldset>
                        <div class="span4">
                            <img src="<?= URL::base().'/storage/uploads/banners/'.$banner->file ;?>">
                        </div>
                        <div class="span7 offset1">

                            <div class="control-group">
                                <input type="file" name="image"> <span class="text text-error">*</span>
                                <p class="help-block">
                                    Image size (350X300)
                                </p>
                            </div>

                            <div class="control-group">
                                <label class="control-label">Title  <span class="text text-error">*</span><span class="text text-error"><?php echo $errors->first('title') ?></span></label>

                                <div class="controls">
                                    <input class="span12" name="title" type="text" placeholder="Banner Title" value="<?= $banner->title;?>">
                                    
                                   
                                </div>
                            </div>
                            <div class="control-group">
                                <label class="control-label">Link</label>

                                <div class="controls">
                                    <input class="span12" name="link" placeholder="Banner Link"
                                           type="text" value="<?= $banner->link;?>">
                                    <small class="muted">Description for street field</small>
                                </div>
                            </div>

                            <div class="control-group">
                                <div class="col-md-6">
                                    <label class="control-label">From Date <span class="text text-error">*</span><span class="text text-error"><?php echo $errors->first('from_date') ?></span></label>

                                    <div class="controls">
                                        <div class="input-append date">
                                            <input class="input-medium" id="from_date" name="from_date" type="text" value="<?= date_format(date_create($banner->from_date),"m/d/Y");?>">
                                        
                                        </div>
                                    </div>
                                    <script>
                                        $(function () {
                                            $("#from_date").datepicker();
                                        });
                                    </script>
                                </div>

                                <div class="col-md-5 clearfix">
                                    <label class="control-label">To Date <span class="text text-error">*</span><span class="text text-error"><?php echo $errors->first('to_date') ?></span></label>

                                    <div class="controls">
                                        <div class="input-append">
                                            <input class="input-medium" id="to_date" name="to_date" type="text" value="<?= date_format(date_create($banner->to_date),"m/d/Y");?>"> 
                                       
                                        </div>
                                        <script>
                                            $(function () {
                                                $("#to_date").datepicker();
                                            });
                                        </script>
                                    </div>
                                </div>
                            </div>


                            <div class="control-group">
                                <div class="col-md-6">
                                    <label class="control-label">Max Impression</label>

                                    <div class="controls">
                                        <div class="input-append">
                                            <input class="input-mini" name="max_impressions" type="text" value="<?= $banner->max_impressions;?>" >

                                        </div>
                                    </div>
                                </div>

                                <div class="col-md-6">
                                    <label class="control-label">Max Click</label>

                                    <div class="controls">
                                        <div class="input-append">
                                            <input class="input-mini" name="max_clicks" type="text" value="<?= $banner->max_clicks;?>">

                                        </div>
                                    </div>
                                </div>
                                
                                <div class="col-md-6">
                                    <label class="control-label">Shows</label>

                                    <div class="controls">
                                        <div class="input-append"> 
                                            <select class="input-medium" name="page" id="page">
                                            <option value="0" <?php if($banner->page == '0') echo "Selected='selected'";?>">ALL</option>
                                            <option value="1" <?php if($banner->page == '1') echo "Selected='selected'";?>">Index Page</option>
                                            <option value="2" <?php if($banner->page == '2') echo "Selected='selected'";?>">Inner Page</option>
                                            </select> 

                                        </div>  <span class="text text-info">(Assign Page)</span>
                                    </div>
                                </div>
                                
                            </div>

</div>

                    </fieldset>


                    <div class="form-actions text-right">
                    <input type="hidden" name="bannerID" id="bannerID" value="<?= $banner->id;?>">
                        <button class="btn btn-primary btn-large" type="submit" name="btnSave" value="save"  <?php if(Config::get('application.mode')){?>onclick="alert ('Sorry! Not allowed in demo mode '); return false;" 
                                        <?}else{?>onclick="return confirm('Are you sure ?');"<?php }?>>
                            <i class="icon-save"></i>
                            Save
                        </button>
                    </div>
                </form>
            </div>


        </div>
    </div>


    <!-- END OF CONTENT -->
</div>



